
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Dependencies and test status</title>
</head>
<body>
<h1>Tree structure, classes and methods or functions, and test status</h1>
<p>
The following information is generated from the sources.
Please run test_status.py to get the latest.
Note that the test information is only as good as it has been
documented in the source files.  Try to help in keeping this up to date.
</p>
<pre title="python_code">

    account_manager.py
        class Accounts(dict): # tested
            __init__(self, pwp=None, from_AMCLI=False) # tested
            __setitem__(self, username, item) # tested indirectly
            load(self) # tested indirectly
            save(self) # tested
            get_password(self, username) # tested
            get_home_dir(self, username) # tested
            is_admin(self, username)
        class AMCLI(object):
            __init__(self, pwp=None)
            interact(self)
            on_command(self, command)
            cmd_set_base_dir(self)
            cmd_exit(self)
            cmd_list(self)
            cmd_new(self, username)
            cmd_edit(self, username)
            cmd_del(self, username)
            cmd_load(self, file_name)
            cmd_help(self, topic=None)
            help(self, topic=None)
            evaluate_home(self, username, home)
    crunchy.py
        find_port(start=8001)
        run_crunchy(host='127.0.0.1', port=None, url=None)
        parse_options()
        convert_url(url)
        open_browser(url)
src
    cometIO.py
        class StringBuffer(object):
            __init__(self)
            get(self)
            getline(self, uid)
            put(self, data)
        class CrunchyIOBuffer(StringBuffer):
            put_output(self, data, uid)
        kill_thread(uid)
        comet(request)
        register_new_page(pageid)
        write_js(pageid, jscode)
        write_output(pageid, uid, output)
        do_exec(code, uid, doctest=False)
        push_input(request)
        raw_push_input(uid, data)
        is_accept_input(uid)
        class ThreadedBuffer(object):
            __init__(self, out_buf=None, in_buf=None, buf_class="STDOUT")
            flush(self)
            register_thread(self, uid)
            unregister_thread(self)
            write(self, data)
            read(self)
            readline(self)
            __redirect(self, uid)
            default_write(self, data)
        debug_msg(data, id_=None)
        init_stdios()
    configuration.py
        make_property(name, default=None, doc=None) # tested
            fget(obj) # indirectly tested
            _set_and_save(obj, _name, value, initial=False) # indirectly tested
            _only_set_and_save_if_new(obj, name, val) # indirectly tested
            fset(obj, val) # indirectly tested
        class Base(object):
            _init_properties(self, cls) # indirectly tested
        class UserPreferences(Base):
            class containing various default values that can be set by user according
            to their preferences.
        
            IMPORTANT you can specify the value of a given "Data descriptor" by entering
            crunchy.descriptor = value
            """
            def __init__(self, prefs, name)
            __init__(self, prefs, name)
            _set_dirs(self)
            _load_settings(self)
            _save_settings(self, name=None, value=None, initial=False)
            _select_language(self, choice)
            _page_security_level(self, url)
            _set_local_security(self, choice)
            _get_current_page_security_level(self)
            _get_site_security(self, site)
            _set_site_security(self, site, choice)
            add_site(self)
            add_rule(self)
            remove_rule(self, no)
            list_rules(self)
            _set_alternate_python_version(self, alt_py)
        init()
    CrunchyPlugin.py
        add_vlam_option(option_name, *args)
        register_http_handler(pattern, handler)
        register_preprocessor(extension, handler)
        register_tag_handler(tag, attribute, keyword, handler)
        register_begin_tag_handler(tag, handler)
        register_final_tag_handler(tag, handler)
        register_begin_pagehandler(handler)
        register_end_pagehandler(handler)
        create_vlam_page(filehandle, url, username=None, remote=False, local=False)
        exec_code(code, uid, doctest=False)
        register_service(servicename, function)
        exec_js(pageid, jscode)
        append_text(page_id, output_id, text)
        get_pageid()
        get_uid()
        get_root_dir()
        kill_thread(uid)
    debug.py
    errors.py
    errors_2k.py
        simplify_traceback(code=None, username=None)
        simplify_syntax_error(code, ex_type, value, trace, lineno, username)
        simplify_doctest_error_message(msg)
    errors_3k.py
        simplify_traceback(code=None, username=None)
        simplify_syntax_error(code, ex_type, value, trace, lineno, username)
        simplify_doctest_error_message(msg)
    http_serve.py
            md5hex(x)
            md5hex(x)
        require_digest_access_authenticate(func)
            wrapped(self)
        class MyHTTPServer(ThreadingMixIn, HTTPServer):
            __init__(self, addr, rqh)
            register_default_handler(self, handler)
            register_handler(self, path, handler)
            register_handler_instance(self, handlerinstance)
            get_handler(self, path)
        class HTTPRequestHandler(BaseHTTPRequestHandler):
            do_POST(self)
            do_GET(self)
            send_response(self, code)
    interface.py
        get_base_dir()
        debug_msg(data)
    interpreter.py
        _async_raise(tid, excobj)
        class KillableThread(threading.Thread):
            raise_exc(self, excobj)
            terminate(self)
        class Interpreter(KillableThread):
            __init__(self, code, channel, symbols = None, doctest=False,
                         username=None)
            run(self)
        softspace(file, newvalue)
        class InteractiveInterpreter(object):
            __init__(self, locals=None, username=None)
            runsource(self, source, filename="User's code", symbol="single")
            runcode(self, code, source)
            write(self, data)
        class InteractiveConsole(InteractiveInterpreter):
            __init__(self, locals=None, filename="&lt;console&gt;", username=None)
            resetbuffer(self)
            interact(self, ps1="&gt;&gt;&gt; ", ps2 = "... ", symbol="single")
            push(self, line, symbol='single')
            raw_input(self, prompt="")
        class SingleConsole(InteractiveConsole):
            __init__(self, locals={}, filename="Crunchy console", username=None)
            restart(self)
        class BorgGroups(object):
            __init__(self, group="Borg")
        class BorgConsole(BorgGroups, SingleConsole):
            __init__(self, locals={}, filename="Crunchy console", group="Borg",
                         username=None)
        class TypeInfoConsole(BorgGroups, SingleConsole):
            __init__(self, locals={}, filename="Crunchy console", group="Borg",
                         username=None)
            runcode(self, code, source)
            show_expression_value(self, val)
    pluginloader.py
        gen_register_list(initial_list)  # tested
        gen_plugin_list()
        init_plugin_system(server)
    PluginServices.py
    security.py
        remove_unwanted(tree, page)  # partially tested
        __cleanup(elem, filter)
        validate_image(src, page)
        is_link_safe(elem, page)
        find_url(url, href, page)
        open_local_file(url)
        scan_for_unwanted(css_file)
    tools.py
        u_print(*args)
        u_join(*args)
    tools_2k.py
        u_print(*args)
        exec_code(code, local_dict, source='', username=None) # tested via test_interface.rst
    tools_3k.py
        exec_code(code, local_dict, source='', username=None) # tested via test_interface.rst
    translation.py
        init_translation(lang=None)
        _(message)
        build_dict(filename)
    utilities.py
        uidgen(username)  # tested
        extract_log_id(vlam)  # tested
        parse_vlam(vlam)
        trim_empty_lines_from_end(text)  # tested
        changeHTMLspecialCharacters(text)  # tested
        unChangeHTMLspecialCharacters(text)
        escape_for_javascript(text)
        insert_markup(elem, uid, vlam, markup, interactive_type)
        wrap_in_div(elem, uid, vlam, element_type, show_vlam)
        extract_code(elem)
        is_interpreter_session(py_code)
        extract_code_from_interpreter(python_code)
        log_session(username)
        append_checkmark(pageid, parent_uid)
        append_warning(pageid, parent_uid)
        append_image(pageid, parent_uid, attributes)
    vlam.py
        handle_exception(full_page=True)
        class BasePage(object): # tested
            __init__(self, username)  # tested
            create_tree(self, filehandle)  # tested
            find_head(self)  # tested
            find_body(self)  # tested
            add_include(self, include_str)  # tested
            includes(self, include_str)  # tested
            add_css_code(self, code)  # tested
            add_crunchy_style(self)  # tested
            insert_css_file(self, path)
            add_user_style(self)  # tested
            add_js_code(self, code)  # tested
            insert_js_file(self, filename)  # tested
            add_charset(self)  # tested
            extract_keyword(self, elem, attr) # tested
            process_handlers3(self)  # tested
            process_handlers2(self)  # tested
            process_type1(self, handlers)  # tested
            process_begin_handlers1(self, handlers)
            process_handlers1(self)  # tested
            process_final_handlers1(self)  # tested
            read(self)  # tested
        class CrunchyPage(BasePage):
            __init__(self, filehandle, url, username=None, remote=False, local=False)
            process_tags(self)
src/imports/DOM
    document.py
        freevar()
        class Document(object): 
            exec_jscript(self, code)
            _get_body(self)
            create_element(self, tagName)
            getElementById(self, id)
        class Element(object):
            __init__(self, document, var)
            _set_innerHTML(self, val)
src/plugins
    analyzer.py
        register():
        analyzer_enabled(username)
        get_analyzer(username)
        analyzer_runner_callback(request)
        analyzer_score_callback(request)
        analyzer_widget_callback(page, elem, uid)
        insert_analyzer_button(page, elem, uid)
        add_scoring(page, button, uid)
    analyzer_pychecker.py
        register():
        class CrunchyChecker:
            """Class to configure and start a pychecker analysis
            """
        
            def __init__(self)
            __init__(self)
            run(self, code)
            get_report(self)
            get_global_score(self)
            _printWarnings(self, warnings, stream=None)
    analyzer_pyflakes.py
        register():
        class CrunchyFlakes:
            """Class to configure and start a pyflakes analysis
            """
        
            def __init__(self)
            __init__(self)
            run(self, code)
            get_report(self)
            get_global_score(self)
            _printWarnings(self, warnings, stream=None)
    analyzer_pylint.py
        register():
            replaced_check_docstring(self, node_type, node)
        class CrunchyLinter:
            """Class to configure and start a pylint analysis
        
            Based on the Run class from pylint.lint
            """
        
            def __init__(self, reporter=None, quiet=0, pylintrc=None)
            __init__(self, reporter=None, quiet=0, pylintrc=None)
            run(self, code)
            get_report(self)
            get_global_score(self)
    cluetip.py
        register():
        insert_cluetip(page, elem, uid)
    colorpicker.py
        register():
        insert_colorpicker(page, elem, uid)
    colourize.py
        register():
        plugin_style(dummy_page, elem, dummy_uid, css_class='crunchy')
        service_style(dummy_page, elem, css_class='crunchy')
        service_style_nostrip(dummy_page, elem, css_class='crunchy')
        style(elem, css_class='crunchy', no_strip=False) # tested
        extract_code(elem, trim=False) # tested
        get_linenumber_offset(vlam) # tested
        replace_element(elem, replacement) # tested
        class Colourizer(object): # tested
            __init__(self, offset=None) # tested indirectly
            formatName(self, aWord)
            formatNumber(self)
            formatOperator(self)
            formatString(self)
            formatComment(self)
            changeHTMLspecialCharacters(self, aString)
            formatMultiLineComment(self)
            indent(self)
            spaceToken(self)
            htmlFormat(self)
            processNewLine(self)
            parseListing(self, code) # tested
        _style(text, offset=None) # tested
        extract_code_from_interpreter(text) # tested
        add_back_prompt_and_output(py_code, stripped, offset=None) # tested
        is_interpreter_session(py_code) # tested
        parsing_error_dialog()
    comet.py
        register():  # tested
    config_gui.py
        register():
        add_configuration_to_menu(page)
        insert_preferences(page, elem, uid)
        set_config(request)
        show(parent, username, uid, to_show=None)
        select_option_type(key, username, uid, allowed_options=configuration.options,
                               ANY=configuration.ANY)
        get_prefs(username)
        class ConfigOption(object):
            __init__(self, key, initial, username=None, uid=None)
            get(self)
            set(self, value)
        class MultiOption(ConfigOption):
            __init__(self, key, initial, values, username=None, uid=None)
            get_values(self)
            set(self, value)
            render(self, elem)
        class BoolOption(ConfigOption):
            render(self, elem)
            set(self, value)
        class StringOption(ConfigOption):
            render(self, elem)
    crunchy_sidebar.py
        register():
        insert_javascript(page, elem, dummy)
    doc_code_check.py
        register():
        class MockPageInfo(object):
            dummy_pageid(self)
            dummy_uid(self)
            set(self)
            restore(self)
        all_code_samples_check_callback(request)
        doc_code_check_callback(request)
        do_single_test(pageid, uid)
        code_setup_process(page, elem, uid)
        code_sample_process(page, elem, uid)
        expected_output_process(dummy, elem, uid)
        insert_comprehensive_test_button(page)
        run_sample(name)  # tested
        compare(s1, s2)  # tested
        extract_name(vlam)  # tested
    editarea.py
        register():
        enable_editarea(page, elem, textarea_id)  # tested
        add_hidden_load_and_save(page, elem, textarea_id)  # tested
        insert_file_browser(page, elem, uid, action, title, js_script, klass)
        add_load_python(page, parent, hidden_load_id, textarea_id)
        filter_none(filename, dummy)
        jquery_file_tree_all(request)
        add_save_python(page, parent, hidden_save_id, textarea_id)
    exam_mode.py
        register():
        setup_exam(page, elem, dummy_uid)
    execution.py
        register():  # tested
        exec_handler(request)  # tested
    file_service.py
        register():
        filtered_dir(request, filter=None)
        insert_file_tree(page, elem, uid, action, callback, title, label)
        save_file_request_handler(request)
        save_and_run_request_handler(request)
        run_external_request_handler(request)
        load_file_request_handler(request)
        save_file(full_path, content)  # tested
        read_file(full_path)  # tested
        exec_external(code=None,  path=None, username=None)
        save_file_python_interpreter_request_handler(request)
        save_and_run_python_interpreter_request_handler(request)
        run_external_python_interpreter_request_handler(request)
        exec_external_python_version(code=None,  path=None, alternate_version=True,
                                         write_over=True, username=None)
    handle_default.py
        register():
        path_to_filedata(path, root, crunchy_username=None)
        handler(request)
        get_directory(npath, crunchy_username)
        error_page(path)
    handle_local.py
        register():  # tested
        local_loader(request)  # tested
        add_to_path(page, elem, *dummy)  # tested
        insert_load_local(page, elem, uid)
        filter_html(filename, basepath)
        jquery_file_tree_html(request)
    handle_remote.py
        register():  # tested
        remote_loader(request)  # tested
        insert_load_remote(dummy_page, parent, dummy_uid) # tested
    io_hook.py
        register():
        register_io_hook(hook, func, uid = 'ANY')
        apply_io_hook(uid, hook, data)
    io_widget.py
        register():   # tested
        kill_thread_handler(request)
        insert_io_subwidget(page, elem, uid, interp_kind=None,
                                sample_code='', show=False)  # partially tested
    links.py
        register():  # tested
        external_link(page, elem, *dummy)  # tested
        fixed_link(*dummy)  # tested
        a_tag_handler(page, elem, *dummy)  # tested
        src_handler(page, elem, *dummy)  # partially tested
        link_tag_handler(page, elem, *dummy)  # partially tested
        secure_url(url)  # tested
        style_handler(page, elem, *dummy)  # tested
            css_import_replace(imp_match) # indirectly tested
    menu.py
        register(): # tested
        create_empty_menu() # tested
        create_home()  # tested
        create_quit() # tested
        insert_menu(page) # tested
    power_browser.py
        register(): # tested
        add_browsing_to_menu(dummy)
        insert_browser(page, *dummy) # tested
    python_files.py
        register():
        class Python_file(object):
            __init__(self, data)
            read(self)
        load_python(request)
        insert_load_python(page, elem, uid)
        filter_py(filename, basepath)
        jquery_file_tree_py(request)
    rst.py
        register(): # tested
            int_or_one(argument)
            class pre(nodes.raw):
                __init__(self, *args, **kwargs)
            class InterpreterDirective(rst.Directive):
                run(self)
            class EditorDirective(rst.Directive):
                run(self)
            class DocTestDirective(rst.Directive):
                run(self)
            class ImageFileDirective(rst.Directive):
                run(self)
            class PythonCodeDirective(rst.Directive):
                run(self)
            class AltPythonVersionDirective(rst.Directive):
                run(self)
            class NoVLAMDirective(rst.Directive):
                run(self)
            visit_pre(translator, node)
            depart_pre(translator, node)
        class ReST_file(object):
            __init__(self, data)
            read(self)
        load_rst(request)
        convert_rst(path, local=True)
        insert_load_rst(page, elem, uid)
        filter_rst(filename, basepath)
        jquery_file_tree_rst(request)
    security_advisor.py
        register():
        create_security_menu_item(page)
        insert_security_info(page, *dummy)
        confirm_at_start(page, info_container)
        format_site_security_options(parent, site, site_num, page)
        add_button(info_container, nb_sites)
        format_table(parent, title, headings, content)
        format_report(page, div)
        set_security_list(request)
        empty_security_list(request)
    style.py
        register():
        pygments_style(page, elem, dummy_uid='42', vlam=None)
        create_show_vlam(cssclass, elem, vlam)
        randomize_css_classes()
        get_pygments_tokens(page, elem, uid)
        class PreHtmlFormatter(HtmlFormatter):
            wrap(self, source, outfile)
            _wrap_code(self, source)
        _style(raw_code, language, cssclass)
        add_linenumber(styled_code, vlam)
        get_linenumber_offset(vlam)
    templates.py
        register():
        create_template(name, username, filehandle) # tested
        return_template(page, elem)
        merge_with_template(page, elem, dummy)
        find_divs(page) # tested
        merge_heads(template, page) # tested
        merge_elements(main, secondary) # tested
        merge_bodies(template, page, page_divs)
    tooltip.py
        register():
        insert_tooltip(page, *dummy)
        dir_handler(request)
        doc_handler(request)
    user_info.py
        register(): # tested
        insert_user_info(page)
    user_markup.py
        register(): # tested
        custom_vlam(page, elem, uid) # tested
        modify_vlam(page, elem, dummy)
        add_option(vlam, option) # tested
        remove_option(vlam, option) # tested
        replace(vlam, values) # tested
    username.py
        register():
        insert_username(page, elem, dummy)
    version.py
        register():
        insert_version(page, elem, dummy)
    vlam_doctest.py
        register():
        doctest_runner_callback(request)
        doctest_widget_callback(page, elem, uid)
    vlam_editor.py
        register():  # tested
        insert_editor_subwidget(page, elem, uid, code="\n")  # tested
        insert_bare_editor(page, elem, uid)
        insert_editor(page, elem, uid)
        insert_alternate_python(page, elem, uid)
    vlam_interpreter.py
        register():
        insert_interpreter(page, elem, uid)
        select_type(vlam, c, elem)
        include_interpreter(interp_kind, page, uid)
        borg_javascript(prefix, page)
        single_javascript(prefix, page)
        parrot_javascript(prefix, page)
        parrots_javascript(prefix, page)
        type_info_javascript(prefix, page)
    vlam_pdb.py
        register():
        pdb_start_callback(request)
        pdb_command_callback(request)
        extract_data(data)
        pdb_filter(data, uid)
        pdb_widget_callback(page, elem, uid)
        pdb_js_file_callback(request)
        class Proto:
            '''Proto used to encode and decode information between mypdb and crunchy'''
        
            def __init__(self)
            __init__(self)
            encode(self, command, data)
            decode(self, msg)
        class MyStringIO(StringIO):
            __init__(self, old_out)
            write(self, data)
        class MyPdb(Pdb):
            __init__(self)
            get_name_id_map(self, d)
            filter_dict(self, d)
            do_output_off(self, arg = None)
            do_output_on(self, arg = None)
            do_crunchy_next(self, arg = None)
            do_crunchy_step(self, arg = None)
            do_crunchy_return(self, arg = None)
            do_crunchy_update_page(self, arg = None)
            do_crunchy_where(self, arg = None)
            dict2table(self, d, old = {})
            do_crunchy_locals(self, arg)
            do_crunchy_globals(self, arg)
    vlam_unittest.py
        register():
        unittest_runner_callback(request)
        unittest_widget_callback(page, elem, uid)
        test_suite()
src/imports
    c_turtle.py
        class CTurtle(object): # tested
            __init__(self, x=0, y=0, angle=0, visible=True) # tested indirectly
            home(self)  # tested
            degrees(self, fullcircle=360.0)  # tested
            radians(self)  # tested
            default_colors(self)  # tested indirectly
            width(self, number)  # tested
            visible(self, choice)  # tested
            left(self, angle)  # tested
            right(self, angle)  # tested
            goto(self, x, y)  # tested
            forward(self, len)  # tested
            backward(self, len)  # tested
            heading(self)  # tested
            setheading(self, angle)  # tested
            setx(self, xpos)  # tested
            sety(self, ypos)  # tested
            position(self)  # tested
            towards(self, *args)  # tested
            penup(self)  # tested
            pendown(self)  # tested
            color(self, *args)  # tested
            fill_color(self, *args) # tested
            background(self, *args) # tested
            _parse_color(self, *args)  # tested
    dhtml.py
        class _Tree(object): # tested
            __init__(self, label, parent=None) # tested indirectly
            append_child(self, child)  # indirectly tested
            remove_child(self, child)  # tested
            remove_all_children(self)  # tested
            delete(self)  # indirectly tested
        image(file_path, width=400, height=400, label='', parent_label=None,
                  from_cwd=False)  # tested
        append(tag, attributes=None, label='', parent_label=None)  # tested
        remove(label='')  # tested
        _js_append_html(pid, tag, child_uid, attributes)
        _js_remove_html(child_uid, parent_uid)
    graphics.py
        init(width=400, height=400, border_color='red', origin='top') # tested
        clear() # tested
        set_line_colour(col) # tested
        set_fill_colour(col) # tested
        line(point_1, point_2) # tested
        _circle(centre, r, filled=False) # tested
        circle(centre, r) # tested
        filled_circle(centre, r) # tested
        _rectangle(corner, w, h, filled=False) # tested
        rectangle(corner, w, h) # tested
        filled_rectangle(corner, w, h) # tested
        _triangle(point_1, point_2, point_3, filled=False) # tested
        triangle(point_1, point_2, point_3) # tested
        filled_triangle(point_1, point_2, point_3) # tested
        point(x, y) # tested
        validate_colour(colour) # tested
    turtle_js.py
        class Turtle(CTurtle):
            __init__(self, x=0, y=0, angle=0,
                visible=True, pen_down=True,
                shell_color='DarkGreen', shell_radius=20,
                head_color='Tan', head_radius=8, head_dist=25,
                legs_color='Tan', legs_radius=8, legs_dist=22,
                eyes_color='DarkGreen', eyes_radius=2, size_scaling=1 )
            goto(self, x, y) # tested
            default_colors(self)
            home(self) # tested
            draw_line(self, from_point, to_point)
            left(self, angle) # tested
            right(self, angle) # tested
            setheading(self, angle) # tested
            draw(self, draw_last=False)
                x(angle)
                y(angle)
            color(self, col)
        _update_drawing()
        class World(object):
            __init__(self, width=600, height=600, border_color='red', empty=True)
            goto(self, x, y)
            clear_world(self)
        goto(x, y)
        _clear_world(uid)
        remove_world()
        _set_line_colour(col)
        set_fill_colour(col)
        __translate_x(x, uid)
        __translate_y(y, uid)
        line(point_1, point_2)
        circle(centre, r)
        filled_circle(centre, r)
        _rectangle(corner, w, h)
        _filled_rectangle(corner, w, h)
        __point(x, y)
    turtle_tk.py

</pre>
</body></html>
